#include <iostream>
class Nil{
        int i;
    public:
        Nil():i(0){std::cout<<"default initialization"<<std::endl;}
        Nil(int value):i(value){std::cout<<"value initialization"<<std::endl;}
        Nil(Nil const&n):i(n.i){std::cout<<"copy initialization"<<std::endl;}
        Nil& operator=(Nil const&n){
            i=n.i;
            std::cout<<"copy operator"<<std::endl;
        }
        ~Nil(){std::cout<<"destructor"<<std::endl;}
};
class base{
    public:
//    ~base(){std::cout<<"~base"<<std::endl;}
    virtual ~base(){std::cout<<"~base"<<std::endl;}
};
class derive:public base{
    public:
        ~derive(){std::cout<<"~derive"<<std::endl;}
};
void func(Nil const&n){}
void fun(Nil n){}
int main(){
//    Nil n;
//    fun(n);
    //derive d;
    base* pb=new derive;
    delete pb;
    //Nil n2(n);
    //Nil n3=n2;

    return 0;
}
